const esbuild = await import('esbuild')

let result

let js = 'fn = obj => { return obj.x }'

result = esbuild.transformSync(js, {
    minify: true,
})

console.log(result)

// { warnings: [], code: 'fn=n=>n.x;\n', map: '' }

result = esbuild.transformSync(js, {})

console.log(result)

/*
{
  warnings: [],
  code: 'fn = (obj) => {\n  return obj.x;\n};\n',
  map: ''
}
*/
